﻿using System.Collections.Generic;
using System.ComponentModel;
using System.Windows;

namespace BloggerAutoPoster.Infrastructure.Models
{
    public class AlertConfirmBoxModel : INotifyPropertyChanged
    {
        #region Fields (6)

        string _currentState;
        List<string> _errors;
        string _errorTitle;
        Visibility _isVisible;
        Visibility _showCancel;
        Visibility _showConfirm;

        #endregion Fields

        #region Properties (6)

        public string CurrentState
        {
            get
            {
                return _currentState;
            }
            set
            {
                if (_currentState == value) return;
                _currentState = value;
                notifyPropertyChanged("CurrentState");
            }
        }

        public List<string> Errors
        {
            get { return _errors; }
            set
            {
                if (_errors == value) return;
                _errors = value;
                notifyPropertyChanged("Errors");
            }
        }

        public string ErrorTitle
        {
            get { return _errorTitle; }
            set
            {
                if (_errorTitle == value) return;
                _errorTitle = value;
                notifyPropertyChanged("ErrorTitle");
            }
        }

        public Visibility IsVisible
        {
            get { return _isVisible; }
            set
            {
                if (_isVisible == value) return;
                _isVisible = value;
                notifyPropertyChanged("IsVisible");
            }
        }

        public Visibility ShowCancel
        {
            get { return _showCancel; }
            set
            {
                if (_showCancel == value) return;
                _showCancel = value;
                notifyPropertyChanged("ShowCancel");
            }
        }

        public Visibility ShowConfirm
        {
            get { return _showConfirm; }
            set
            {
                if (_showConfirm == value) return;
                _showConfirm = value;
                notifyPropertyChanged("ShowConfirm");
            }
        }

        #endregion Properties



        #region INotifyPropertyChanged Members
        public event PropertyChangedEventHandler PropertyChanged;
        private void notifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
        #endregion
    }
}
